$(function (){
  //获取li元素的数量
  var linum = $('.five-content .five-content-item').length;
 //设置ul容器的宽度元素的宽度
    $('.five-content').width(linum*190);
//监听左按钮
    $('.aft').click(function (e) { 
      e.preventDefault();
        var lfwid = parseInt($('.five-content').css('left'));
        var rfwid = parseInt($('.five-content').css('right'));
        console.log(lfwid,rfwid);

        $('.five-content').css('left',(lfwid-190)+'px');
        if(rfwid==0){
          $('.five-content').css('left',0);
        }
    });
//监听右按钮
    $('.pre').click(function (e) { 
      var lfwid = parseInt($('.five-content').css('left'));
      var rfwid = parseInt($('.five-content').css('right'));
      console.log(lfwid,rfwid);
      
      $('.five-content').css('left',(lfwid+190)+'px');
      $('.five-content').css('left',(lfwid-190)+'px');
      if(lfwid==0){
        $('.five-content').css('left',0);
      }
  });
});